Generalized Bézier-like model and its applications to curve and surface modeling

The subject matter of surfaces in computer aided geometric design (CAGD) is the depiction and design of surfaces in the computer graphics arena. Due to their geometric features, modeling of Bézier curves and surfaces with their shape parameters is the most well-liked topic of research in CAGD/computer-aided manufacturing (CAM). The primary challenges in industries such as automotive, shipbuilding, and aerospace are the design of complex surfaces. In order to address this issue, the continuity constraints between surfaces are utilized to generate complex surfaces. The parametric and geometric continuities are the two metrics commonly used for establishing connections among surfaces. This paper proposes continuity constraints between two generalized Bézier-like surfaces (gBS) with different shape parameters to address the issue of modeling and designing surfaces. Initially, the generalized form of C3 and G3 of generalized Bézier-like curves (gBC) are developed. To check the validity of these constraints, some numerical examples are also analyzed with graphical representations. Furthermore, for a continuous connection among these gBS, the necessary and sufficient G1 and G2 continuity constraints are also developed. It is shown through the use of several geometric designs of gBS that the recommended basis can resolve the shape and position adjustment problems associated with Bézier surfaces more effectively than any other basis. As a result, the proposed scheme not only incorporates all of the geometric features of curve design schemes but also improves upon their faults, which are typically encountered in engineering. Mainly, by changing the values of shape parameters, we can alter the shape of the curve by our choice which is not present in the standard Bézier model. This is the main drawback of traditional Bézier model.


Introduction
Be ´zier curves have a lot of applications in the fields of science, engineering, and technology such as: railway route and highway modeling, network, computer aided design system, robotics, environment design, communication and many other fields just because of their computational simplicity and stability.In addition to being significant research tools in CAGD, parametric curves and surfaces are also effective tools for shape design and geometric interpretation [1,2].In a real-world problems, most of the curves and surfaces are complex to model.Therefore, having a tool to create flexible and adjustable curves and surfaces becomes necessary to model any complex shapes.However, finding a representation for the desired complex curves and surfaces is difficult and impractical [3].To tackle these problems, the curves and surfaces are broken down into simpler curve and patches, joining them to form of complex curves or surfaces.To join such curves or surfaces, a continuity concept is applied.Smoother connections between curves or surfaces typically indicate a higher level of continuity.Two standard functions have been used in connecting these curves or surfaces; parametric and geometric continuity.The parametric continuity of order r, or C r is the simplest form of the continuity.Nonetheless, parametric continuity has some restrictions.For example, when the surfaces are connected by C 1 continuity, they still need to possess a common tangent at their boundary points.Hence, parametric continuity cannot be the only exact standard method in constructing smooth curves or surfaces.As a result, the researchers have developed an upgraded version of parametric continuity called geometric continuity, or G r continuity.G r continuity is the less restrictive form where scale factors are embedded in the continuity.These scale factors overcome a common tangent for the curves or surfaces.The classical Be ´zier curves have some flaws and limitations due to their fixed shape and position relative to their control polygon.A lot of work has been carried out to overcome these flaws.The shape and positions of the curve is enhanced by introducing the shape control parameters in the Be ´zier approach.The shape of the curve is control by utilizing the different values of shape parameters.
Bernstein basis functions are often used to create classical Be ´zier curves and surfaces because they have a clear definition and a number of advantageous features.As a result, Be ´zier modeling has already established itself as one of the crucial techniques for describing complex curves and surfaces in the CAGD area [4,5].De Casteljau became the leading person to define the Be ´zier surfaces by using triangular domain in the late 1950s.Boehm carried on his research, and his achievements are documented in [6].Throughout the 1970s and 1980s, different researchers did comprehensive research on the Be ´zier triangular surface [7][8][9][10][11].Meanwhile, Abedallah [12] worked on the Be ´zier triangular logic surface.This surface theory was improved through the participation of such philosophers.Numerous researchers are fascinated by the triangular surface modeling framework only because of how well it may construct complicated structures.However, only a few prior works have focused on refining the triangular surface to enhance the traditional triangular Be ´zier structure after the Be ´zier-like surfaces theory has fully matured [13][14][15][16].
A revised basis function with n − 1 shape parameters was provided by Qin et al. [17].As an application, they developed countless surfaces and curves.The biquintic Be ´zier surfaces were developed by Ammad et al. [18].They discussed the geometric characteristics of surfaces and offered some surfaces with shape customization.The Be ´zier-like surfaces with distinct shape parameters that have similar geometric characteristics to BC, were first introduced by Hu et al. [19].They established the necessary and sufficient conditions for G 1 continuity, G 2 beta continuity and Farin-Boehm G 2 continuity across two successive developed surfaces.Hu et al. [20] proposed the generalized Be ´zier surface with various shape parameters and highlighted its applications in engineering.Li et al. [21] generalized the H-Be ´zier model and derived the necessary and sufficient conditions of first and second order geometric continuity.The G 1 geometric continuity constraints of two successive H-Be ´zier surfaces are also illustrated.In addition, certain H-Be ´zier surface modeling examples are shown to demonstrate the effectiveness of computer design for complex curves and surface models.Bibi et al. [22] used graphical depiction to construct the necessary and sufficient G 2 continuity requirements of two sequential generalized hybrid trigonometric Be ´zier surfaces in various directions.They also formed some free-form complex engineering surfaces.Hu et al. [23] modeled the gBS with independent shape parameters.They gave conditions for G 2 continuity between two adjacent gBS.They also discussed some properties and applications of the smooth continuity between these surfaces.Mad et al. [24] discussed the fractional continuity of degree two (or F 2 ) for generalized fractional Be ´zier surfaces, which can be used to alter the shape without changing the control points.
This work presents the new formulation for the surfaces by utilizing the gBS.The generalized Bernstein-like basis function has two different shape parameters which help to alter the shape without changing the value of control points.The generalized form of parametric C 3 and geometric G 3 continuity constraints are constructed and some numerical examples are presented to check the validity of these constraints.The continuity constraints of surfaces are presented by using the gBS and their applications are also given in this study.This paper's contribution is the continuity extension of [25,26] carried out by Ameer et al.The following are some of the contributions made by this work: • The generalized form of parametric C 3 and geometric G 3 continuity constraints are constructed.
• The effect of shape parameters are analyzed by some numerical examples.
• The generalized form of G 2 Be ´zier-like surfaces continuity constraints with two distinct parameters are constructed.
• To check the validity of these continuity constraints, some figures are formed.
The following is an outline of the article: Section 2 contains preliminary details on curvature, generalized Bernstein-like basis functions and gBC with characteristics, as well as constraints on parametric and geometric continuity.In section 3, we construct surface continuity requirements for gBS with two shape parameters.Section 4 provides the work's conclusion.

Preliminaries
When constructing a curve of any type, the cartesian coordinate system is often used for the majority of the work.Because of this, the control points are considered to exist in two tuples concurrently.
In a similar vein, both points and vectors are presented in this article in boldface throughout its entirety.e.g., and the following equation can be used to define the Euclidean norm of a vector jjUðΦÞjj ¼ ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi . The notation for the derivative of the function U(F) is written as U 0 (F).

Curvature
The term "curvature" refers to one of the most essential ideas in geometry, which is a subfield of mathematics.The fundamental idea behind the term curvature refers to the extent to which a curve veers away from the position of a straight line by a certain amount.For any parametric curve denoted by the symbol "U(F)," the curvature, in addition to its corresponding expression in mathematics, can be described as follows: kðFÞ ¼ U 0 ðFÞ � U 00 ðFÞ jjU 0 ðFÞjj 3 : ð2Þ For any parametric curve that exists in two dimensions, the curvature can alternatively be stated as follows: ; ð3Þ where u and v are the x and y components of U(F).In summary, the definition of the rate of change of curvature, symbolised by the symbol κ 0 (F), is obtained by calculating the first derivative of Eq (2) as: k 0 ðFÞ ¼ jjU 0 ðFÞjj 2 fU 0 ðFÞ � U 000 ðFÞg À 3fU 0 ðFÞ � U 00 ðFÞgfU 0 ðFÞ � U 00 ðFÞg where ||U 0 (F)|| is the magnitude of the tangent vector.As a consequence, the reciprocal of the curvature can be used to determine the radius of curvature.By taking the first derivative of Eq (3), we obtain: : ð5Þ

Generalized Bernstein-like functions
This section discusses the definition of generalized Bernstein-like (gB-like) functions as well as their properties, specifically those functions having two distinct shape parameters.Definition 1 Given B, z 2 [0, 3], for w 2 ½0; 1�, the functions are known as quadratic Bernstein-like functions [25].
For any integer r(r � 3), the functions � u f ;r ð wÞðf ¼ 0; 1; . . .; rÞ are recursively explained by: where � u f ;r ð wÞ are known as gB-like functions of degree r [25].These functions become zero when f < 0 or f > r.The gB-like basis functions are stated in a precise manner as follows: In [25], the geometric characteristics of gB-like basis functions are shown to be proven.

Generalized Be ´zier-like curves and surfaces
The following section covers the definition of Be ´zier-like curves and surfaces with two shape parameters.

Construction of the generalized Be ´zier-like curve with two shape parameters
the Bézier-like curve of order r, where � u f ;r ð wÞðf ¼ 0; 1; . . .; rÞ are the Bernstein-like basis functions.
The geometric properties of gBC are proved in [25].3 show the effect of shape parameters on the curve and modification in curve by changing the values of shape parameters.Note that if the value of shape parameter is large then the curve is close to the control net and by decreasing the value of shape parameter it is going away from the control net.which is called the Bézier-like order surface r×s with control points W f,g , where � u f ;r ð wÞ and � u g;rÀ 1 ð w1Þ are Bernstein-like basis functions.The B, z and B1, z1 are the shape parameters for the basis functions � u f ;r ð wÞ and � u g;s ð w1Þ, respectively.Similarly, we can construct the Be ´zier-like surfaces and alter the shape of surfaces by our choice.To check the effect of shape parameters on the surfaces, Figs 4-6 are constructed by different values of shape parameters, which shows that by changing the value of shape parameters the shape of the surfaces are adjusted.As the value of the shape parameters increases the surface becomes closer to the control net, which is helpful to construct the different models in engineering and many other fields.

Continuity constraints of Be ´zier-like curves
In this part, we will discuss about the parametric and geometric constraints of Be ´zier-like curves.When it comes to making complicated figures and doing different kinds of modeling, the continuity conditions are particularly helpful.Here, we discuss the C 3 and G 3 continuity of Be ´zier-like curves.The aim of reaching C 3 and G 3 continuity after C 2 and G 2 continuity, is to achieve a high level of smoothness in order to make intricate figures.Consequently, the continuity of C 3 and G 3 must initially contain lower order continuity.
The next theorem is for the generalization of C 3 parametric continuity constraints, the rest has been established in Ameer et al. [26].  1.For C 0 continuity:

Theorem 1 Consider any two Bézier-like curves Wð wÞ
4. For C 3 continuity constraints, we used the constraints of C 2 continuity and obtained the new fourth control points E 3 in C 3 continuity.As a consequence, we have: Proof The C f (f = 0, 1, 2) continuity is already proved in [26].The C 3 continuity can be achieved by using the C 2 continuity conditions and W 000 ð1Þ ¼ W 000  1 ð0Þ.After some simplifications, we can obtain the C 3 continuity conditions which is given in Eq (14).
The next theorem is for the generalization of G 3 geometric continuity constraints, the rest has been established in Ameer et al. [26].

Theorem 2 Consider any two Bézier-like curves Wð wÞ
ii.For G 1 continuity: iii.For G 2 continuity, r � 3, s � 3 4. For G 3 continuity constraints, we used G 2 continuity constraints and also obtained the new fourth control points E 3 in G 3 continuity.Therefore, we have: where ; ; and w 5 ¼ Proof The G k (k = 0, 1, 2) continuity is already proved in [26].In order to satisfy the G 3 continuity requirements, it is necessary that the first derivative of the curvature at end points must be same as the second derivative at the initial point, i.e., k 0 1 ð1Þ ¼ �k 0 2 ð0Þ.The mathematical expression shows that the first derivative of curvature gives the rate of change of curvature: ¼ jjW 0 ð1Þjj 2 fW 0 ð1Þ � W 000 ð1Þg À 3fW 0 ð0Þ � W 00 ð1ÞgfW 0 ð1Þ � W 00 ð1Þg jjW 0 ð1Þjj 5 ð17Þ and k 0 2 ð0Þ ¼ jjW 0 ð0Þjj 2 fW 0 ð0Þ � W 000 ð0Þg À 3fW 0 ð0Þ � W 00 ð0ÞgfW 0 ð0Þ � W 00 ð0Þg jjW 0 ð0Þjj The provided conditions are considered as follows: ; where ψ = ϕ 3 and ξ = ϕ 2 meet the G 3 continuity constraints.Consider, where � ðxW 00 2 ð0Þ þ �W 0 2 ð0ÞÞg: Since ||φs(θ)|| = |ϕ|||s(θ)||, we obtain: and by using the value of φ in Eq (20), we have: Remark: The curvature plot are useful to check the smooth continuity between the two curves which are connected by parametric and geometric continuity of any order.The curvature plot of the second curve k 2 ð w À 1Þ can be drawn on w 2 ½1; 2�, the first curve's curvature k 1 ð wÞ can be plotted on w 2 ½0; 1�.The purpose of doing is just to clear visualization of curvature continuity.The above numerical examples show that the continuity constraints are valid and they can be used to connect any two different degree curves.By changing the value of shape parameters, curve can be altered by our choice.The curvature plot of that curve shows that the connection is smooth.The value of shape parameter effects the shape of the curve.Figs 15 and 16 show that after changing the value of shape parameter, the curve is also changed.It means that with the help of shape parameters, we can modify shape of the curve by our choice which is the prime property of the proposed gBC that is not present in the traditional Be ´zier models.
It is noted that, when the curve is connected by C 3 continuity, the first four control points of the second curve are calculated by the continuity constraints of C 3 and the remaining control points are given by the user but in the case of C 2 continuity just first three control points are calculated by continuity constraints and rest of all control points of the second curve are given by the user.The G 3 continuity is smoother than G 2 continuity because G 3 continuity ensures that not only curvature of the curves aligned but their rate of change of curvature also matches.It means transition between the curves is not only visually smooth but also mathematically satisfied.In the setting of G 2 continuity, it is possible to notice visual imperfections or faults where the curves meet.In contrast, G

Surface continuity
In this section, we will discuss the continuity of two surfaces.

G 2 Surface continuity
Ensuring the preservation of G 2 continuity between adjacent surface patches is of utmost importance in engineering applications.This implies that when two curved surfaces intersect, it is necessary for them to have a tangent plane in common or a normal line that is shared collectively at every point of intersection.There is a presence of continuity in four distinct   conditions:

G 2 continuity in w direction on every surface
where z > 0 is any positive real value.Proof To achieve G 0 continuity, it is required for both areas of gBS to possess a shared edge curve i.e., W r1;s1 ð w; 1; B; B1; z; z1Þ ¼ W1 r2;s2 ð w; 0; which results The normal direction fails to split off at the boundary for either of the two parts of the surface; hence, the connecting boundary must have a common tangent plane in order to preserve G 1 continuity between both parts of the surface.So, we have the following condition: @ @ w W r;s1 ð w; 1; B; B1; z; z1Þ � @ @ w1 W r;s1 ð w; 1; B; B1; z; z1Þ ¼ zð w1Þ @ @ w W1 r;s2 ð w; 1; where zð w1Þ is the scaling factor among their normal vectors such that zð w1Þ > 0. Equivalently, @ @ w W r;s1 ð w; 1; B; B1; z; z1Þ ¼ z � @ @ w1 W1 r;s2 ð w; 0; Since @ @ w W r;s1 ð w; 1; B; B1; z; z1Þ and @ @ w W1 r;s2 ð w; 0; Substituting Eqs ( 29) and (30) in Eq (28), we have By using Eq (27) in Eq (32) and after some simplifications, we have Eqs ( 27) and (32), explain the continuity conditions on each surface, are the general conditions for G 1 continuity in the w direction.In accumulation, the two surfaces must maintain the same normal curvature at any point on their joint boundary in order to satisfy the G 1 continuity condition.As a result, the two surfaces must also satisfy the G 2 continuity constraints: where the functions kð wÞ, dð wÞ can be expressed as linear functions of w and c represents an indeterminate constant.In order to simplify the equation and facilitate calculations in the context of the applied submission, it is common practice to assume that both kð wÞ and dð wÞ are equal to zero.Consequently, the aforementioned equation can be further reduced as: W r;s1 ð w; 1; B; B1; z; z1Þ ¼ z 2 @ 2 @ w1 2 W1 r;s2 ð w; 0; Since @ 2 @ w1 2 W r;s1 ð w; 1; B; B1; z; z1Þ ¼ and Substituting Eqs (35) and (36) in Eq (34), we achieve To sum up, if the two surfaces satisfy Eqs ( 27) and ( 33) and (38) at the same time, the G 2 continuity in w direction is achieved.

Continuity in w1 direction
Similarly, the G 1 and G 2 continuity can be obtained in the direction of w1 for two gBS as the continuity in the direction of w for two gBS, which is discussed in detail in Section 3. By changing the value of shape parameters and scaling factor, the surface and control net can be altered by our choice.When the shape parameters have a fixed value and the value of scaling factor varies then the control points D1 1,i exhibit a tendency to move either closer to or farther away from the control points D1 2,i , depending on whether the value of scaling factor f raises or reduces.Similarly, when the scaling factor f is kept constant and value of the shape parameters is increased or decreased, the surface demonstrates a tendency to move either closer to or farther away from the control polygon (control net).The present investigation demonstrates that the piecewise Be ´zier-Like surface exhibits smoothness and continuity at the joints, hence enhancing its efficacy in addressing challenges related to engineering appearance design through the modification of surface position and shape.
The effect of shape parameters and scaling factor can be shown in the few surface figures.26, when the values of shape parameters are increases and the scaling factor remains constant at 1.5 then the surface moves closer to the control net.On the other hand as in the Figs 27-30 the scaling factor is at constant value 0.9 and the value of shape parameter is increased then the surface moves away from the control net.Figs 31-34 has the same value of shape parameters but the value of scaling factor varies.The control points D1 2,i move closer to the control points D1 1,i as the value of scaling factor f increased.By varying the value of shape parameters and scaling factors the surface can be modeled according to our choice which is very useful to model the complex surfaces in the field of engineering.

Conclusions
Be ´zier curves are versatile mathematical functions commonly used to represent smooth curves and shapes in digital environments.Their uses extend to a wide range of applications, including editing images, creating visual compositions, and designing fonts with precise curves and contours.Be ´zier curves offer a powerful tool for creating intricate and visually appealing designs in order to increase the number of control points, allowing for greater control and precision compared to simple straight lines.Any curved shape might be achieved by increasing the number of control points.However, simply using a gBC is insufficient when discussing the modeling of complicated figures and font design.In order to address this problem, this research derived the parametric and geometric conditions of degree three (C 3 and G 3 continuity) between any two gBC.These special continuity preserving curves are utilized in CAD/ CAM and have shape-controlling parameters.Moreover, we proposed continuity constraints (G 1 and G 2 continuity) between two gBS with different shape parameters to address the issue of modeling and designing surfaces.Using the different values of shape parameters, we can alter the shape of surfaces by our choice, which is very helpful in modeling some complex surfaces in engineering and some other fields as well.This integration gains more control and adjustability over the curves and surfaces through the addition of the shape parameter.Our research is significant and useful since our proposal enables the construction of more easilyrealized complex curves and surfaces using computer.These gB-Like functions will find application in quantum engineering and post quantum calculus frames in the future, approximation theory and CAGD researchers may find them interesting.Furthermore, it is suggested to extend the application of gBS to the creation of developable surfaces.The implementation of shape parameters in the creation of developable surfaces is anticipated to offer more versatility and adaptability in relation to the size of surface patches.

Fig 1
depicts the cubic Be ´zier-like curve for the shape parameter values B = 2 and z = 2. Fig 2 shows the cubic Be ´zier-like curve for the same values of shape parameters.Fig 3 is constructed by different values of shape parameters, which shows that with these values of shape parameters, the curves get closer.The Figs 2 and

Example 2 . 1
Fig 7 depicts the two quantic Bézier-like curves Wð wÞ and W1ð wÞ are connected by C 3 parametric continuity.The control points of the curve Wð wÞ such that D r , r = 0, 1, 2, 3, 4 are given by the choice of user and with the help of parametric C 3 constraints, given in

Fig 10 .
Fig 10.Curvature plot of cubic-quantic Be ´zier-like curve segments.https://doi.org/10.1371/journal.pone.0303340.g010 Fig 17 depicts that the two Be ´zier-like curves are connected with C 2 continuity [26].Similarly, Fig 18 shows that the two Be ´zier-like curves are connected with G 2 continuity [26].To check the validation of the C 2 and G 2 continuity constraints, the curvature plot is illustrated.Figs 19 and 20 depict the curvature plot of the the parametric continuity C 2 and geometric continuity G 2 respectively, show the smooth connection of their joints.

Fig 11 .
Fig 11.Cubic-quantic Be ´zier-like curve segments with geometric G 3 continuity.https://doi.org/10.1371/journal.pone.0303340.g011 3 continuity reduces artifacts by providing smoother transitions.The curvature plot of the second curve k 2 ð wÞ is drawn on w 2 ½1; 2� and the first curve's curvature k 1 ð wÞ is plotted on w 2 ½1; 2�.The purpose of doing this is just to clear visualization of curvature continuity.To verify that G 3 is smoother than G 2 , curvature plot of the curves which is connected by G 3 and G 2 continuity are given in the Figs 12 and 20, respectively.It is clearly see in the Fig 12 that the curvature plot of the curves which is connected by G 3 is smoother than the curves which is connected by G 2 continuity in the Fig 20.Similarly, for the comparison of C 3 and C 2 continuity, the curvature plot of C 3 and C 2 are expressed in the Figs 8 and 19, respectively.It is clearly shown in the Figs 8 and 19, that the curvature plot which is connected by C 3 continuity are smoother than the curvature plot which are connected by C 2 continuity.Hence G 3 /C 3 continuity are smoother than G 2 /C 2 continuity.

Fig 31 .
Fig 31.The quantic Be ´zierlike surface for f = 0.9, B = B* = 1.6, z = z * = 1.6.https://doi.org/10.1371/journal.pone.0303340.g031 2. For two Be ´zier-like surfaces, the G 2 continuity is also explored in the w direction.The continuity of G1 among Be ´zier-like surfaces areas for z = z * B = B* has mutual control points r1 = r2 = r, and variations in D f,s1−1 , D f,s1 , D1 f,1 .The G 2 continuity of two areas among Be ´zier-like surfaces considered for B = B1* and z = z1 * in w1 and w directions with r1 = s2 common control points, and the control points D f,s1−1 , D f,s1 (or D1 0,f ), D1 1,g are taken in varied order.Figs 21 and 22 are modeled with the help of G 2 surface continuity constraint.Fig 21 shows the two cubic Be ´zier-like surfaces, which are connected with G 2 surface continuity constraints.Smooth connection between these two cubic surfaces shows that our continuity constraints are valid.We can alter the figure by just changing the value of shape parameters and scaling factor.Similarly, Fig 22 depicts the two quantic Be ´zier-like surfaces, which are linked by G 2 surface continuity constraints.

Figs 23 -
26 depict the G 2 surface continuity of two Be ´zier-Like surfaces for different values of shape parameters.Note that from Figs 23-